<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>Docker 安装 | 学习笔记</title>
    <meta name="generator" content="VuePress 1.9.10">
    <link rel="icon" href="/favicon.ico">
    <script charset="utf-8" async="async" src="/js/jquery.min.js"></script>
    <script charset="utf-8" async="async" src="/js/global.js"></script>
    <script charset="utf-8" async="async" src="/js/fingerprint2.min.js"></script>
    <script>
              var _hmt = _hmt || [];
              (function() {
                var hm = document.createElement("script");
                hm.src = "https://hm.baidu.com/hm.js?0b31b4c146bf7126aed5009e1a4a11c8";
                var s = document.getElementsByTagName("script")[0];
                s.parentNode.insertBefore(hm, s);
              })();
            </script>
    <meta name="description" content="记录学习笔记、项目心得、趟过的雷、踩过的坑">
    <meta property="article:modified_time" content="2023-05-23T00:40:46.000Z">
    <meta property="og:title" content="Docker 安装">
    <meta property="og:type" content="article">
    <meta property="og:url" content="/md/devops/docker/Docker-%E5%AE%89%E8%A3%85.html">
    <meta name="twitter:title" content="Docker 安装">
    <meta name="twitter:url" content="/md/devops/docker/Docker-%E5%AE%89%E8%A3%85.html">
    <meta name="twitter:card" content="summary_large_image">
    <meta name="robots" content="all">
    <meta name="author" content="青山">
    <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
    <meta http-equiv="Pragma" content="no-cache">
    <meta http-equiv="Expires" content="0">
    <meta name="keywords" content="学习笔记, DDD抽奖系统，数据结构，重学Java设计模式, 字节码编程, 中间件, 手写Spring, 手写MyBatis，Java基础, 面经手册，面试题，API网关，SpringBoot Stater">
    <meta name="apple-mobile-web-app-capable" content="yes">
    
    <link rel="preload" href="/assets/css/0.styles.4e2267cf.css" as="style"><link rel="preload" href="/assets/css/styles.css?v=1722145213052" as="style"><link rel="preload" href="/assets/js/cg-styles.js?v=1722145213052" as="script"><link rel="preload" href="/assets/js/cg-app.js?v=1722145213052" as="script"><link rel="preload" href="/assets/js/cg-4.js?v=1722145213052" as="script"><link rel="preload" href="/assets/js/cg-44.js?v=1722145213052" as="script"><link rel="preload" href="/assets/js/cg-2.js?v=1722145213052" as="script"><link rel="preload" href="/assets/js/cg-25.js?v=1722145213052" as="script">
    <link rel="stylesheet" href="/assets/css/0.styles.4e2267cf.css"><link rel="stylesheet" href="/assets/css/styles.css?v=1722145213052">
  </head>
  <body>
    <div id="app" data-server-rendered="true"><div class="theme-container"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/" class="home-link router-link-active"><!----> <span class="site-name">学习笔记</span></a> <div class="links"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/md/nav/nav.html" class="nav-link">
  导航
</a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="读书&amp;笔记" class="dropdown-title"><span class="title">读书&amp;笔记</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><h4>
          Java
        </h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/md/book/Java Multithread Programming/Java多线程编程核心技术（第3版）.html" class="nav-link">
  Java多线程编程核心技术（第3版）
</a></li><li class="dropdown-subitem"><a href="/md/book/OnJava中文版基础/第一章.html" class="nav-link">
  On Java 中文版 基础
</a></li><li class="dropdown-subitem"><a href="/md/sad/必修2-计算机基础.html" class="nav-link">
  架构师
</a></li></ul></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="Java" class="dropdown-title"><span class="title">Java</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><h4>
          Java 基础
        </h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/md/java/core/HelloJava.html" class="nav-link">
  Hello Java
</a></li><li class="dropdown-subitem"><a href="/md/java/core/Java-基础-变量.html" class="nav-link">
  Java 基础
</a></li><li class="dropdown-subitem"><a href="/md/java/core/Java-基础-面向对象.html" class="nav-link">
  Java 面向对象
</a></li></ul></li><li class="dropdown-item"><h4>
          JVM
        </h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/md/java/jvm/JVM-基础-类字节码详解.html" class="nav-link">
  JVM 基础
</a></li><li class="dropdown-subitem"><a href="/md/java/jvm/GC-Java-垃圾回收基础知识.html" class="nav-link">
  GC
</a></li></ul></li><li class="dropdown-item"><h4>
          JUC
        </h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/md/java/juc/JUC并发编程.html" class="nav-link">
  JUC并发编程
</a></li></ul></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="Spring" class="dropdown-title"><span class="title">Spring</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><h4>
          Spring
        </h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/md/devops/docker/.html" class="nav-link">
  搬砖中。。。
</a></li></ul></li><li class="dropdown-item"><h4>
          Spring Boot
        </h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/md/devops/docker/.html" class="nav-link">
  搬砖中。。。
</a></li></ul></li><li class="dropdown-item"><h4>
          Spring Cloud
        </h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/md/devops/docker/.html" class="nav-link">
  搬砖中。。。
</a></li></ul></li><li class="dropdown-item"><h4>
          Spring Security
        </h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/md/devops/docker/.html" class="nav-link">
  搬砖中。。。
</a></li></ul></li><li class="dropdown-item"><h4>
          Spring Session
        </h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/md/devops/docker/.html" class="nav-link">
  搬砖中。。。
</a></li></ul></li><li class="dropdown-item"><h4>
          Spring Data
        </h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/md/devops/docker/.html" class="nav-link">
  搬砖中。。。
</a></li></ul></li><li class="dropdown-item"><h4>
          Spring Batch
        </h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/md/devops/docker/.html" class="nav-link">
  搬砖中。。。
</a></li></ul></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="Java框架" class="dropdown-title"><span class="title">Java框架</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><h4>
          Mybatis
        </h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/md/devops/docker/.html" class="nav-link">
  搬砖中。。。
</a></li></ul></li><li class="dropdown-item"><h4>
          MybatisPlus
        </h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/md/devops/docker/.html" class="nav-link">
  搬砖中。。。
</a></li></ul></li><li class="dropdown-item"><h4>
          日志框架
        </h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/md/devops/docker/.html" class="nav-link">
  搬砖中。。。
</a></li></ul></li><li class="dropdown-item"><h4>
          缓存
        </h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/md/devops/docker/.html" class="nav-link">
  搬砖中。。。
</a></li></ul></li><li class="dropdown-item"><h4>
          连接池
        </h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/md/devops/docker/.html" class="nav-link">
  搬砖中。。。
</a></li></ul></li><li class="dropdown-item"><h4>
          ShardingSphere
        </h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/md/devops/docker/.html" class="nav-link">
  搬砖中。。。
</a></li></ul></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="设计模式&amp;算法" class="dropdown-title"><span class="title">设计模式&amp;算法</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><h4>
          设计模式
        </h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/md/designPattern/参考资料.html" class="nav-link">
  参考资料
</a></li><li class="dropdown-subitem"><a href="/md/designPattern/设计模式七大原则.html" class="nav-link">
  设计模式七大原则
</a></li><li class="dropdown-subitem"><a href="/md/designPattern/UML图.html" class="nav-link">
  UML图
</a></li><li class="dropdown-subitem"><a href="/md/designPattern/Java设计模式.html" class="nav-link">
  Java设计模式
</a></li></ul></li><li class="dropdown-item"><h4>
          算法
        </h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/md/devops/docker/.html" class="nav-link">
  搬砖中。。。
</a></li></ul></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="数据库" class="dropdown-title"><span class="title">数据库</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><h4>
          Oracle
        </h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/md/devops/docker/.html" class="nav-link">
  搬砖中。。。
</a></li></ul></li><li class="dropdown-item"><h4>
          MySQL
        </h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/md/devops/docker/.html" class="nav-link">
  搬砖中。。。
</a></li></ul></li><li class="dropdown-item"><h4>
          Redis
        </h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/md/devops/docker/.html" class="nav-link">
  搬砖中。。。
</a></li></ul></li><li class="dropdown-item"><h4>
          Elasticsearch
        </h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/md/devops/docker/.html" class="nav-link">
  搬砖中。。。
</a></li></ul></li><li class="dropdown-item"><h4>
          Kafka
        </h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/md/devops/docker/.html" class="nav-link">
  搬砖中。。。
</a></li></ul></li><li class="dropdown-item"><h4>
          Mongodb
        </h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/md/devops/docker/.html" class="nav-link">
  搬砖中。。。
</a></li></ul></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="中间件" class="dropdown-title"><span class="title">中间件</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><h4>
          Tomcat
        </h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/md/devops/docker/.html" class="nav-link">
  搬砖中。。。
</a></li></ul></li><li class="dropdown-item"><h4>
          Nginx
        </h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/md/devops/docker/.html" class="nav-link">
  搬砖中。。。
</a></li></ul></li><li class="dropdown-item"><h4>
          RabbitMQ
        </h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/md/devops/docker/.html" class="nav-link">
  搬砖中。。。
</a></li></ul></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="开发工具" class="dropdown-title"><span class="title">开发工具</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><h4>
          Docker
        </h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/md/devops/docker/Docker-简介.html" class="nav-link">
  Docker 简介
</a></li><li class="dropdown-subitem"><a href="/md/devops/docker/Docker-安装.html" class="nav-link">
  Docker 安装
</a></li><li class="dropdown-subitem"><a href="/md/devops/docker/Docker-常用命令.html" class="nav-link">
  Docker 常用命令
</a></li><li class="dropdown-subitem"><a href="/md/devops/docker/Docker-镜像.html" class="nav-link">
  Docker 镜像
</a></li><li class="dropdown-subitem"><a href="/md/devops/docker/Docker-数据卷.html" class="nav-link">
  Docker 数据卷
</a></li></ul></li><li class="dropdown-item"><h4>
          K8s
        </h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/md/devops/docker/.html" class="nav-link">
  搬砖中。。。
</a></li></ul></li><li class="dropdown-item"><h4>
          Git
        </h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/md/devops/docker/.html" class="nav-link">
  搬砖中。。。
</a></li></ul></li><li class="dropdown-item"><h4>
          Maven
        </h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/md/devops/docker/.html" class="nav-link">
  搬砖中。。。
</a></li></ul></li><li class="dropdown-item"><h4>
          Gradle
        </h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/md/devops/docker/.html" class="nav-link">
  搬砖中。。。
</a></li></ul></li><li class="dropdown-item"><h4>
          Idea
        </h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/md/idea/插件.html" class="nav-link">
  插件
</a></li><li class="dropdown-subitem"><a href="/md/idea/常用设置.html" class="nav-link">
  常用设置
</a></li></ul></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="环境部署" class="dropdown-title"><span class="title">环境部署</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><h4>
          MySQL
        </h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/md/db/mysql/MySQL-安装.html" class="nav-link">
  MySQL 安装
</a></li></ul></li><li class="dropdown-item"><h4>
          Docker
        </h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/md/devops/docker/Docker-安装.html" class="nav-link">
  Docker 安装
</a></li></ul></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="源码仓库" class="dropdown-title"><span class="title">源码仓库</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="https://github.com/YiShanQingF/LearningNotes" target="_blank" rel="noopener noreferrer" class="nav-link external">
  开源项目 - Github
  <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li><li class="dropdown-item"><!----> <a href="https://gitee.com/zhufanjia/LearningNotes" target="_blank" rel="noopener noreferrer" class="nav-link external">
  开源项目 - Gitee
  <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li></ul></div></div> <!----></nav></div></header> <div class="sidebar-mask"></div> <aside class="sidebar"><nav class="nav-links"><div class="nav-item"><a href="/md/nav/nav.html" class="nav-link">
  导航
</a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="读书&amp;笔记" class="dropdown-title"><span class="title">读书&amp;笔记</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><h4>
          Java
        </h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/md/book/Java Multithread Programming/Java多线程编程核心技术（第3版）.html" class="nav-link">
  Java多线程编程核心技术（第3版）
</a></li><li class="dropdown-subitem"><a href="/md/book/OnJava中文版基础/第一章.html" class="nav-link">
  On Java 中文版 基础
</a></li><li class="dropdown-subitem"><a href="/md/sad/必修2-计算机基础.html" class="nav-link">
  架构师
</a></li></ul></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="Java" class="dropdown-title"><span class="title">Java</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><h4>
          Java 基础
        </h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/md/java/core/HelloJava.html" class="nav-link">
  Hello Java
</a></li><li class="dropdown-subitem"><a href="/md/java/core/Java-基础-变量.html" class="nav-link">
  Java 基础
</a></li><li class="dropdown-subitem"><a href="/md/java/core/Java-基础-面向对象.html" class="nav-link">
  Java 面向对象
</a></li></ul></li><li class="dropdown-item"><h4>
          JVM
        </h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/md/java/jvm/JVM-基础-类字节码详解.html" class="nav-link">
  JVM 基础
</a></li><li class="dropdown-subitem"><a href="/md/java/jvm/GC-Java-垃圾回收基础知识.html" class="nav-link">
  GC
</a></li></ul></li><li class="dropdown-item"><h4>
          JUC
        </h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/md/java/juc/JUC并发编程.html" class="nav-link">
  JUC并发编程
</a></li></ul></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="Spring" class="dropdown-title"><span class="title">Spring</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><h4>
          Spring
        </h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/md/devops/docker/.html" class="nav-link">
  搬砖中。。。
</a></li></ul></li><li class="dropdown-item"><h4>
          Spring Boot
        </h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/md/devops/docker/.html" class="nav-link">
  搬砖中。。。
</a></li></ul></li><li class="dropdown-item"><h4>
          Spring Cloud
        </h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/md/devops/docker/.html" class="nav-link">
  搬砖中。。。
</a></li></ul></li><li class="dropdown-item"><h4>
          Spring Security
        </h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/md/devops/docker/.html" class="nav-link">
  搬砖中。。。
</a></li></ul></li><li class="dropdown-item"><h4>
          Spring Session
        </h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/md/devops/docker/.html" class="nav-link">
  搬砖中。。。
</a></li></ul></li><li class="dropdown-item"><h4>
          Spring Data
        </h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/md/devops/docker/.html" class="nav-link">
  搬砖中。。。
</a></li></ul></li><li class="dropdown-item"><h4>
          Spring Batch
        </h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/md/devops/docker/.html" class="nav-link">
  搬砖中。。。
</a></li></ul></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="Java框架" class="dropdown-title"><span class="title">Java框架</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><h4>
          Mybatis
        </h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/md/devops/docker/.html" class="nav-link">
  搬砖中。。。
</a></li></ul></li><li class="dropdown-item"><h4>
          MybatisPlus
        </h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/md/devops/docker/.html" class="nav-link">
  搬砖中。。。
</a></li></ul></li><li class="dropdown-item"><h4>
          日志框架
        </h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/md/devops/docker/.html" class="nav-link">
  搬砖中。。。
</a></li></ul></li><li class="dropdown-item"><h4>
          缓存
        </h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/md/devops/docker/.html" class="nav-link">
  搬砖中。。。
</a></li></ul></li><li class="dropdown-item"><h4>
          连接池
        </h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/md/devops/docker/.html" class="nav-link">
  搬砖中。。。
</a></li></ul></li><li class="dropdown-item"><h4>
          ShardingSphere
        </h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/md/devops/docker/.html" class="nav-link">
  搬砖中。。。
</a></li></ul></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="设计模式&amp;算法" class="dropdown-title"><span class="title">设计模式&amp;算法</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><h4>
          设计模式
        </h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/md/designPattern/参考资料.html" class="nav-link">
  参考资料
</a></li><li class="dropdown-subitem"><a href="/md/designPattern/设计模式七大原则.html" class="nav-link">
  设计模式七大原则
</a></li><li class="dropdown-subitem"><a href="/md/designPattern/UML图.html" class="nav-link">
  UML图
</a></li><li class="dropdown-subitem"><a href="/md/designPattern/Java设计模式.html" class="nav-link">
  Java设计模式
</a></li></ul></li><li class="dropdown-item"><h4>
          算法
        </h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/md/devops/docker/.html" class="nav-link">
  搬砖中。。。
</a></li></ul></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="数据库" class="dropdown-title"><span class="title">数据库</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><h4>
          Oracle
        </h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/md/devops/docker/.html" class="nav-link">
  搬砖中。。。
</a></li></ul></li><li class="dropdown-item"><h4>
          MySQL
        </h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/md/devops/docker/.html" class="nav-link">
  搬砖中。。。
</a></li></ul></li><li class="dropdown-item"><h4>
          Redis
        </h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/md/devops/docker/.html" class="nav-link">
  搬砖中。。。
</a></li></ul></li><li class="dropdown-item"><h4>
          Elasticsearch
        </h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/md/devops/docker/.html" class="nav-link">
  搬砖中。。。
</a></li></ul></li><li class="dropdown-item"><h4>
          Kafka
        </h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/md/devops/docker/.html" class="nav-link">
  搬砖中。。。
</a></li></ul></li><li class="dropdown-item"><h4>
          Mongodb
        </h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/md/devops/docker/.html" class="nav-link">
  搬砖中。。。
</a></li></ul></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="中间件" class="dropdown-title"><span class="title">中间件</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><h4>
          Tomcat
        </h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/md/devops/docker/.html" class="nav-link">
  搬砖中。。。
</a></li></ul></li><li class="dropdown-item"><h4>
          Nginx
        </h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/md/devops/docker/.html" class="nav-link">
  搬砖中。。。
</a></li></ul></li><li class="dropdown-item"><h4>
          RabbitMQ
        </h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/md/devops/docker/.html" class="nav-link">
  搬砖中。。。
</a></li></ul></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="开发工具" class="dropdown-title"><span class="title">开发工具</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><h4>
          Docker
        </h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/md/devops/docker/Docker-简介.html" class="nav-link">
  Docker 简介
</a></li><li class="dropdown-subitem"><a href="/md/devops/docker/Docker-安装.html" class="nav-link">
  Docker 安装
</a></li><li class="dropdown-subitem"><a href="/md/devops/docker/Docker-常用命令.html" class="nav-link">
  Docker 常用命令
</a></li><li class="dropdown-subitem"><a href="/md/devops/docker/Docker-镜像.html" class="nav-link">
  Docker 镜像
</a></li><li class="dropdown-subitem"><a href="/md/devops/docker/Docker-数据卷.html" class="nav-link">
  Docker 数据卷
</a></li></ul></li><li class="dropdown-item"><h4>
          K8s
        </h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/md/devops/docker/.html" class="nav-link">
  搬砖中。。。
</a></li></ul></li><li class="dropdown-item"><h4>
          Git
        </h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/md/devops/docker/.html" class="nav-link">
  搬砖中。。。
</a></li></ul></li><li class="dropdown-item"><h4>
          Maven
        </h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/md/devops/docker/.html" class="nav-link">
  搬砖中。。。
</a></li></ul></li><li class="dropdown-item"><h4>
          Gradle
        </h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/md/devops/docker/.html" class="nav-link">
  搬砖中。。。
</a></li></ul></li><li class="dropdown-item"><h4>
          Idea
        </h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/md/idea/插件.html" class="nav-link">
  插件
</a></li><li class="dropdown-subitem"><a href="/md/idea/常用设置.html" class="nav-link">
  常用设置
</a></li></ul></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="环境部署" class="dropdown-title"><span class="title">环境部署</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><h4>
          MySQL
        </h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/md/db/mysql/MySQL-安装.html" class="nav-link">
  MySQL 安装
</a></li></ul></li><li class="dropdown-item"><h4>
          Docker
        </h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/md/devops/docker/Docker-安装.html" class="nav-link">
  Docker 安装
</a></li></ul></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="源码仓库" class="dropdown-title"><span class="title">源码仓库</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="https://github.com/YiShanQingF/LearningNotes" target="_blank" rel="noopener noreferrer" class="nav-link external">
  开源项目 - Github
  <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li><li class="dropdown-item"><!----> <a href="https://gitee.com/zhufanjia/LearningNotes" target="_blank" rel="noopener noreferrer" class="nav-link external">
  开源项目 - Gitee
  <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li></ul></div></div> <!----></nav>  <ul class="sidebar-links"><li><section class="sidebar-group depth-0"><p class="sidebar-heading open"><span>Docker</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/md/devops/docker/Docker-简介.html" class="sidebar-link">Docker 简介</a></li><li><a href="/md/devops/docker/Docker-安装.html" class="active sidebar-link">Docker 安装</a></li><li><a href="/md/devops/docker/Docker-常用命令.html" class="sidebar-link">Docker 常用命令</a></li><li><a href="/md/devops/docker/Docker-镜像.html" class="sidebar-link">Docker 镜像</a></li><li><a href="/md/devops/docker/Docker-数据卷.html" class="sidebar-link">Docker 数据卷</a></li></ul></section></li></ul> </aside> <div><main class="page"> <div class="theme-default-content content__default"><h1 id="centos-安装-docker"><a href="#centos-安装-docker" class="header-anchor">#</a> CentOS 安装 Docker</h1> <p><a href="https://docs.docker.com/engine/install/centos/" target="_blank" rel="noopener noreferrer">官方安装文档：https://docs.docker.com/engine/install/centos/<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></p> <h2 id="docker-基本概念"><a href="#docker-基本概念" class="header-anchor">#</a> Docker 基本概念</h2> <p><a href="https://docs.docker.com/get-started/overview/" target="_blank" rel="noopener noreferrer">Docker overview：https://docs.docker.com/get-started/overview/<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></p> <h3 id="镜像-image"><a href="#镜像-image" class="header-anchor">#</a> 镜像 image</h3> <p>Docker 镜像（Image）就是一个只读的模板。镜像可以用来创建 Docker 容器，一个镜像可以创建很多容器。
它也相当于是一个root文件系统。比如官方镜像 centos:7 就包含了完整的一套 centos:7 最小系统的 root 文件系统。
相当于容器的“源代码”，docker镜像文件类似于Java的类，而docker容器实例类似于java中new出来的实例对象。</p> <h3 id="容器-container"><a href="#容器-container" class="header-anchor">#</a> 容器 Container</h3> <p>Docker 利用容器（Container）独立运行的一个或一组应用，应用程序或服务运行在容器里面，容器就类似于一个虚拟化的运行环境，容器是用镜像创建的运行实例。
就像是Java中的类和实例对象一样，镜像是静态的定义，容器是镜像运行时的实体。
容器为镜像提供了一个标准的和隔离的运行环境，它可以被启动、开始、停止、删除。每个容器都是相互隔离的、保证安全的平台。</p> <h3 id="仓库-repository"><a href="#仓库-repository" class="header-anchor">#</a> 仓库 Repository</h3> <p>仓库（Repository）是集中存放镜像文件的场所。</p> <h3 id="docker-架构"><a href="#docker-架构" class="header-anchor">#</a> Docker 架构</h3> <p>Docker 是<code>Client-Server</code>架构模式
Docker 客户端(Client) 与Docker守护进程进行通信，Docker守护进程负责构建、启动和分发Docker容器。
<img alt="" data-src="/images/devops/docker/docker-%E5%B7%A5%E4%BD%9C%E5%8E%9F%E7%90%86%E5%9B%BE.svg" loading="lazy" class="lazy"></p> <h2 id="前提条件"><a href="#前提条件" class="header-anchor">#</a> 前提条件</h2> <h3 id="centos-版本要求"><a href="#centos-版本要求" class="header-anchor">#</a> CentOS 版本要求</h3> <p>CentOS 仅发行版本中的内核支持 Docker。Docker 运行在CentOS 7 (64-bit)上，要求系统为64位、Linux系统内核版本为 3.8以上，选用Centos7.x。
查看内核&amp;查看发行版本</p> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code><span class="token function">uname</span> <span class="token parameter variable">-sr</span>
<span class="token function">uname</span> <span class="token parameter variable">-a</span>
<span class="token function">cat</span> /proc/version
lsb_release <span class="token parameter variable">-a</span>
<span class="token function">cat</span> /etc/redhat-release
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br></div></div><h3 id="卸载旧版本"><a href="#卸载旧版本" class="header-anchor">#</a> 卸载旧版本</h3> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code>yum remove <span class="token function">docker</span> <span class="token punctuation">\</span>
           docker-client <span class="token punctuation">\</span>
           docker-client-latest <span class="token punctuation">\</span>
           docker-common <span class="token punctuation">\</span>
           docker-latest <span class="token punctuation">\</span>
           docker-latest-logrotate <span class="token punctuation">\</span>
           docker-logrotate <span class="token punctuation">\</span>
           docker-engine
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br></div></div><h3 id="yum安装gcc相关"><a href="#yum安装gcc相关" class="header-anchor">#</a> yum安装gcc相关</h3> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code>yum <span class="token parameter variable">-y</span> <span class="token function">install</span> gcc
yum <span class="token parameter variable">-y</span> <span class="token function">install</span> gcc-c++
yum <span class="token function">install</span> <span class="token parameter variable">-y</span> yum-utils
yum makecache fast
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br></div></div><h3 id="设置stable镜像仓库"><a href="#设置stable镜像仓库" class="header-anchor">#</a> 设置stable镜像仓库</h3> <p><strong>设置stable镜像仓库，需要设置阿里云或者国内的镜像地址！！！</strong></p> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code>yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><h2 id="安装-docker"><a href="#安装-docker" class="header-anchor">#</a> 安装 Docker</h2> <h3 id="安装最新版"><a href="#安装最新版" class="header-anchor">#</a> 安装最新版</h3> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code>yum <span class="token function">install</span> docker-ce docker-ce-cli containerd.io
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><h3 id="选择版本安装"><a href="#选择版本安装" class="header-anchor">#</a> 选择版本安装</h3> <ul><li>查看历史版本</li></ul> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code>yum list docker-ce <span class="token parameter variable">--showduplicates</span> <span class="token operator">|</span> <span class="token function">sort</span> <span class="token parameter variable">-r</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><ul><li>选择指定版本安装</li></ul> <p><code>yum install docker-ce-&lt;VERSION_STRING&gt; docker-ce-cli-&lt;VERSION_STRING&gt; containerd.io</code></p> <p>将&lt;VERSION_STRING&gt;替换为所需版本，然后运行以下命令进行安装</p> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code>yum <span class="token function">install</span> docker-ce-19.03.9-3.el7 docker-ce-cli-19.03.9-3.el7 containerd.io
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><h3 id="启动-docker"><a href="#启动-docker" class="header-anchor">#</a> 启动 Docker</h3> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code>systemctl start <span class="token function">docker</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><h3 id="测试-hello-world"><a href="#测试-hello-world" class="header-anchor">#</a> 测试 Hello World</h3> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code><span class="token function">docker</span> run hello-world
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><h3 id="卸载"><a href="#卸载" class="header-anchor">#</a> 卸载</h3> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code>systemctl stop <span class="token function">docker</span>
yum remove docker-ce docker-ce-cli containerd.io
<span class="token function">rm</span> <span class="token parameter variable">-rf</span> /var/lib/docker
<span class="token function">rm</span> <span class="token parameter variable">-rf</span> /var/lib/containerd
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br></div></div><h3 id="停止-重启"><a href="#停止-重启" class="header-anchor">#</a> 停止&amp;重启</h3> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code>systemctl stop <span class="token function">docker</span>

systemctl restart <span class="token function">docker</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br></div></div><h3 id="相关命令"><a href="#相关命令" class="header-anchor">#</a> 相关命令</h3> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code><span class="token comment"># 启动</span>
systemctl start <span class="token function">docker</span>
<span class="token comment"># 停止</span>
systemctl stop <span class="token function">docker</span>
<span class="token comment"># 重启</span>
systemctl restart <span class="token function">docker</span>
<span class="token comment"># 查看状态</span>
systemctl status <span class="token function">docker</span>
<span class="token comment"># 设置开机启动</span>
systemctl <span class="token builtin class-name">enable</span> <span class="token function">docker</span>
<span class="token comment"># 设置开机不启动</span>
systemctl disabled <span class="token function">docker</span>
<span class="token comment"># 查看开机是否启动</span>
systemctl list-unit-files<span class="token operator">|</span><span class="token function">grep</span> <span class="token function">docker</span>
<span class="token comment"># 查看版本</span>
<span class="token function">docker</span> <span class="token parameter variable">-v</span>
<span class="token function">docker</span> version
<span class="token comment"># 查看信息</span>
<span class="token function">docker</span> info
<span class="token comment"># 查看帮助文档</span>
<span class="token function">docker</span> <span class="token parameter variable">--help</span>
<span class="token comment"># 查看docker命令帮助文档</span>
<span class="token function">docker</span> 具体命令 <span class="token parameter variable">--help</span>
<span class="token comment"># 安装位置查看</span>
<span class="token function">which</span> <span class="token function">docker</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br><span class="line-number">19</span><br><span class="line-number">20</span><br><span class="line-number">21</span><br><span class="line-number">22</span><br><span class="line-number">23</span><br><span class="line-number">24</span><br><span class="line-number">25</span><br></div></div><h2 id="镜像加速"><a href="#镜像加速" class="header-anchor">#</a> 镜像加速</h2> <h3 id="阿里云镜像加速地址"><a href="#阿里云镜像加速地址" class="header-anchor">#</a> 阿里云镜像加速地址</h3> <p><a href="https://promotion.aliyun.com/ntms/act/kubernetes.html" target="_blank" rel="noopener noreferrer">阿里云：https://promotion.aliyun.com/ntms/act/kubernetes.html<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></p> <h3 id="镜像地址获取操作步骤"><a href="#镜像地址获取操作步骤" class="header-anchor">#</a> 镜像地址获取操作步骤</h3> <p><img alt="" data-src="/images/devops/docker/%E9%98%BF%E9%87%8C%E4%BA%91%E9%95%9C%E5%83%8F%E5%8A%A0%E9%80%9F-1.jpg" loading="lazy" class="lazy"></p> <p><img alt="" data-src="/images/devops/docker/%E9%98%BF%E9%87%8C%E4%BA%91%E9%95%9C%E5%83%8F%E5%8A%A0%E9%80%9F-2.jpg" loading="lazy" class="lazy"></p> <p><img alt="" data-src="/images/devops/docker/%E9%98%BF%E9%87%8C%E4%BA%91%E9%95%9C%E5%83%8F%E5%8A%A0%E9%80%9F-3.jpg" loading="lazy" class="lazy"></p> <h3 id="创建目录"><a href="#创建目录" class="header-anchor">#</a> 创建目录</h3> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code><span class="token function">mkdir</span> <span class="token parameter variable">-p</span> /etc/docker
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><h3 id="修改配置"><a href="#修改配置" class="header-anchor">#</a> 修改配置</h3> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code><span class="token function">tee</span> /etc/docker/daemon.json <span class="token operator">&lt;&lt;-</span><span class="token string">'EOF'
{
  &quot;registry-mirrors&quot;: [&quot;https://xxxxxxx.mirror.aliyuncs.com&quot;]
}
EOF</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br></div></div><h3 id="重启-docker"><a href="#重启-docker" class="header-anchor">#</a> 重启 Docker</h3> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code>systemctl daemon-reload
systemctl restart <span class="token function">docker</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br></div></div><h2 id="修改docker默认存储位置"><a href="#修改docker默认存储位置" class="header-anchor">#</a> 修改Docker默认存储位置</h2> <h3 id="默认路径"><a href="#默认路径" class="header-anchor">#</a> 默认路径</h3> <p>Centos7安装docker之后，默认的镜像及容器存储路径为/var/lib/docker，可以使用命令docker info查看。</p> <h3 id="修改配置-2"><a href="#修改配置-2" class="header-anchor">#</a> 修改配置</h3> <p>将--graph /data/docker添加在docker.service文件中的ExecStart字段后面，其中/data/docker为你需要修改的存储目录</p> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code><span class="token function">mkdir</span> <span class="token parameter variable">-p</span> /data/docker
<span class="token function">vim</span> /usr/lib/systemd/system/docker.service
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br></div></div><p>将
<code>ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock</code>
改为
<code>ExecStart=/usr/bin/dockerd --graph /data/docker -H fd:// --containerd=/run/containerd/containerd.sock</code></p> <h3 id="重启服务"><a href="#重启服务" class="header-anchor">#</a> 重启服务</h3> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code>systemctl daemon-reload
systemctl restart <span class="token function">docker</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br></div></div><h3 id="验证"><a href="#验证" class="header-anchor">#</a> 验证</h3> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code><span class="token function">docker</span> info<span class="token operator">|</span><span class="token function">grep</span> <span class="token string">'Docker Root Dir'</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div></div> <!----> <footer class="page-edit"><div class="edit-link"><a href="https://github.com/YiShanQingF/LearningNotes/edit/master/docs/md/devops/docker/Docker-安装.md" target="_blank" rel="noopener noreferrer">在 GitHub 上编辑此页</a> <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></div> <div class="last-updated"><span class="prefix">上次更新: </span> <span class="time">2023/5/23</span></div></footer> <div class="page-nav"><p class="inner"><span class="prev">
        ←
        <a href="/md/devops/docker/Docker-简介.html" class="prev">
          Docker 简介
        </a></span> <span class="next"><a href="/md/devops/docker/Docker-常用命令.html">
          Docker 常用命令
        </a>
        →
      </span></p></div> </main></div> <aside class="page-sidebar"> <div class="page-side-toolbar"><div class="option-box-toc-fixed"><div class="toc-container-sidebar"><div class="pos-box"><div class="icon-arrow"></div> <div class="scroll-box" style="max-height:650px"><div style="font-weight:bold;text-align:center;">Docker 安装</div> <hr> <div class="toc-box"><ul class="toc-sidebar-links"><li><a href="/md/devops/docker/Docker-%E5%AE%89%E8%A3%85.html#docker-基本概念" class="toc-sidebar-link">Docker 基本概念</a><ul class="toc-sidebar-sub-headers"><li class="toc-sidebar-sub-header"><a href="/md/devops/docker/Docker-%E5%AE%89%E8%A3%85.html#镜像-image" class="toc-sidebar-link">镜像 image</a></li><li class="toc-sidebar-sub-header"><a href="/md/devops/docker/Docker-%E5%AE%89%E8%A3%85.html#容器-container" class="toc-sidebar-link">容器 Container</a></li><li class="toc-sidebar-sub-header"><a href="/md/devops/docker/Docker-%E5%AE%89%E8%A3%85.html#仓库-repository" class="toc-sidebar-link">仓库 Repository</a></li><li class="toc-sidebar-sub-header"><a href="/md/devops/docker/Docker-%E5%AE%89%E8%A3%85.html#docker-架构" class="toc-sidebar-link">Docker 架构</a></li></ul></li><li><a href="/md/devops/docker/Docker-%E5%AE%89%E8%A3%85.html#前提条件" class="toc-sidebar-link">前提条件</a><ul class="toc-sidebar-sub-headers"><li class="toc-sidebar-sub-header"><a href="/md/devops/docker/Docker-%E5%AE%89%E8%A3%85.html#centos-版本要求" class="toc-sidebar-link">CentOS 版本要求</a></li><li class="toc-sidebar-sub-header"><a href="/md/devops/docker/Docker-%E5%AE%89%E8%A3%85.html#卸载旧版本" class="toc-sidebar-link">卸载旧版本</a></li><li class="toc-sidebar-sub-header"><a href="/md/devops/docker/Docker-%E5%AE%89%E8%A3%85.html#yum安装gcc相关" class="toc-sidebar-link">yum安装gcc相关</a></li><li class="toc-sidebar-sub-header"><a href="/md/devops/docker/Docker-%E5%AE%89%E8%A3%85.html#设置stable镜像仓库" class="toc-sidebar-link">设置stable镜像仓库</a></li></ul></li><li><a href="/md/devops/docker/Docker-%E5%AE%89%E8%A3%85.html#安装-docker" class="toc-sidebar-link">安装 Docker</a><ul class="toc-sidebar-sub-headers"><li class="toc-sidebar-sub-header"><a href="/md/devops/docker/Docker-%E5%AE%89%E8%A3%85.html#安装最新版" class="toc-sidebar-link">安装最新版</a></li><li class="toc-sidebar-sub-header"><a href="/md/devops/docker/Docker-%E5%AE%89%E8%A3%85.html#选择版本安装" class="toc-sidebar-link">选择版本安装</a></li><li class="toc-sidebar-sub-header"><a href="/md/devops/docker/Docker-%E5%AE%89%E8%A3%85.html#启动-docker" class="toc-sidebar-link">启动 Docker</a></li><li class="toc-sidebar-sub-header"><a href="/md/devops/docker/Docker-%E5%AE%89%E8%A3%85.html#测试-hello-world" class="toc-sidebar-link">测试 Hello World</a></li><li class="toc-sidebar-sub-header"><a href="/md/devops/docker/Docker-%E5%AE%89%E8%A3%85.html#卸载" class="toc-sidebar-link">卸载</a></li><li class="toc-sidebar-sub-header"><a href="/md/devops/docker/Docker-%E5%AE%89%E8%A3%85.html#停止-重启" class="toc-sidebar-link">停止&amp;重启</a></li><li class="toc-sidebar-sub-header"><a href="/md/devops/docker/Docker-%E5%AE%89%E8%A3%85.html#相关命令" class="toc-sidebar-link">相关命令</a></li></ul></li><li><a href="/md/devops/docker/Docker-%E5%AE%89%E8%A3%85.html#镜像加速" class="toc-sidebar-link">镜像加速</a><ul class="toc-sidebar-sub-headers"><li class="toc-sidebar-sub-header"><a href="/md/devops/docker/Docker-%E5%AE%89%E8%A3%85.html#阿里云镜像加速地址" class="toc-sidebar-link">阿里云镜像加速地址</a></li><li class="toc-sidebar-sub-header"><a href="/md/devops/docker/Docker-%E5%AE%89%E8%A3%85.html#镜像地址获取操作步骤" class="toc-sidebar-link">镜像地址获取操作步骤</a></li><li class="toc-sidebar-sub-header"><a href="/md/devops/docker/Docker-%E5%AE%89%E8%A3%85.html#创建目录" class="toc-sidebar-link">创建目录</a></li><li class="toc-sidebar-sub-header"><a href="/md/devops/docker/Docker-%E5%AE%89%E8%A3%85.html#修改配置" class="toc-sidebar-link">修改配置</a></li><li class="toc-sidebar-sub-header"><a href="/md/devops/docker/Docker-%E5%AE%89%E8%A3%85.html#重启-docker" class="toc-sidebar-link">重启 Docker</a></li></ul></li><li><a href="/md/devops/docker/Docker-%E5%AE%89%E8%A3%85.html#修改docker默认存储位置" class="toc-sidebar-link">修改Docker默认存储位置</a><ul class="toc-sidebar-sub-headers"><li class="toc-sidebar-sub-header"><a href="/md/devops/docker/Docker-%E5%AE%89%E8%A3%85.html#默认路径" class="toc-sidebar-link">默认路径</a></li><li class="toc-sidebar-sub-header"><a href="/md/devops/docker/Docker-%E5%AE%89%E8%A3%85.html#修改配置-2" class="toc-sidebar-link">修改配置</a></li><li class="toc-sidebar-sub-header"><a href="/md/devops/docker/Docker-%E5%AE%89%E8%A3%85.html#重启服务" class="toc-sidebar-link">重启服务</a></li><li class="toc-sidebar-sub-header"><a href="/md/devops/docker/Docker-%E5%AE%89%E8%A3%85.html#验证" class="toc-sidebar-link">验证</a></li></ul></li></ul></div></div></div></div></div> <div class="option-box-toc-over"><img src="/images/system/toc.png" class="nozoom"> <span class="show-txt">目录</span> <div class="toc-container"><div class="pos-box"><div class="icon-arrow"></div> <div class="scroll-box" style="max-height:550px"><div style="font-weight:bold;text-align:center;">Docker 安装</div> <hr> <div class="toc-box"><ul class="toc-sidebar-links"><li><a href="/md/devops/docker/Docker-%E5%AE%89%E8%A3%85.html#docker-基本概念" class="toc-sidebar-link">Docker 基本概念</a><ul class="toc-sidebar-sub-headers"><li class="toc-sidebar-sub-header"><a href="/md/devops/docker/Docker-%E5%AE%89%E8%A3%85.html#镜像-image" class="toc-sidebar-link">镜像 image</a></li><li class="toc-sidebar-sub-header"><a href="/md/devops/docker/Docker-%E5%AE%89%E8%A3%85.html#容器-container" class="toc-sidebar-link">容器 Container</a></li><li class="toc-sidebar-sub-header"><a href="/md/devops/docker/Docker-%E5%AE%89%E8%A3%85.html#仓库-repository" class="toc-sidebar-link">仓库 Repository</a></li><li class="toc-sidebar-sub-header"><a href="/md/devops/docker/Docker-%E5%AE%89%E8%A3%85.html#docker-架构" class="toc-sidebar-link">Docker 架构</a></li></ul></li><li><a href="/md/devops/docker/Docker-%E5%AE%89%E8%A3%85.html#前提条件" class="toc-sidebar-link">前提条件</a><ul class="toc-sidebar-sub-headers"><li class="toc-sidebar-sub-header"><a href="/md/devops/docker/Docker-%E5%AE%89%E8%A3%85.html#centos-版本要求" class="toc-sidebar-link">CentOS 版本要求</a></li><li class="toc-sidebar-sub-header"><a href="/md/devops/docker/Docker-%E5%AE%89%E8%A3%85.html#卸载旧版本" class="toc-sidebar-link">卸载旧版本</a></li><li class="toc-sidebar-sub-header"><a href="/md/devops/docker/Docker-%E5%AE%89%E8%A3%85.html#yum安装gcc相关" class="toc-sidebar-link">yum安装gcc相关</a></li><li class="toc-sidebar-sub-header"><a href="/md/devops/docker/Docker-%E5%AE%89%E8%A3%85.html#设置stable镜像仓库" class="toc-sidebar-link">设置stable镜像仓库</a></li></ul></li><li><a href="/md/devops/docker/Docker-%E5%AE%89%E8%A3%85.html#安装-docker" class="toc-sidebar-link">安装 Docker</a><ul class="toc-sidebar-sub-headers"><li class="toc-sidebar-sub-header"><a href="/md/devops/docker/Docker-%E5%AE%89%E8%A3%85.html#安装最新版" class="toc-sidebar-link">安装最新版</a></li><li class="toc-sidebar-sub-header"><a href="/md/devops/docker/Docker-%E5%AE%89%E8%A3%85.html#选择版本安装" class="toc-sidebar-link">选择版本安装</a></li><li class="toc-sidebar-sub-header"><a href="/md/devops/docker/Docker-%E5%AE%89%E8%A3%85.html#启动-docker" class="toc-sidebar-link">启动 Docker</a></li><li class="toc-sidebar-sub-header"><a href="/md/devops/docker/Docker-%E5%AE%89%E8%A3%85.html#测试-hello-world" class="toc-sidebar-link">测试 Hello World</a></li><li class="toc-sidebar-sub-header"><a href="/md/devops/docker/Docker-%E5%AE%89%E8%A3%85.html#卸载" class="toc-sidebar-link">卸载</a></li><li class="toc-sidebar-sub-header"><a href="/md/devops/docker/Docker-%E5%AE%89%E8%A3%85.html#停止-重启" class="toc-sidebar-link">停止&amp;重启</a></li><li class="toc-sidebar-sub-header"><a href="/md/devops/docker/Docker-%E5%AE%89%E8%A3%85.html#相关命令" class="toc-sidebar-link">相关命令</a></li></ul></li><li><a href="/md/devops/docker/Docker-%E5%AE%89%E8%A3%85.html#镜像加速" class="toc-sidebar-link">镜像加速</a><ul class="toc-sidebar-sub-headers"><li class="toc-sidebar-sub-header"><a href="/md/devops/docker/Docker-%E5%AE%89%E8%A3%85.html#阿里云镜像加速地址" class="toc-sidebar-link">阿里云镜像加速地址</a></li><li class="toc-sidebar-sub-header"><a href="/md/devops/docker/Docker-%E5%AE%89%E8%A3%85.html#镜像地址获取操作步骤" class="toc-sidebar-link">镜像地址获取操作步骤</a></li><li class="toc-sidebar-sub-header"><a href="/md/devops/docker/Docker-%E5%AE%89%E8%A3%85.html#创建目录" class="toc-sidebar-link">创建目录</a></li><li class="toc-sidebar-sub-header"><a href="/md/devops/docker/Docker-%E5%AE%89%E8%A3%85.html#修改配置" class="toc-sidebar-link">修改配置</a></li><li class="toc-sidebar-sub-header"><a href="/md/devops/docker/Docker-%E5%AE%89%E8%A3%85.html#重启-docker" class="toc-sidebar-link">重启 Docker</a></li></ul></li><li><a href="/md/devops/docker/Docker-%E5%AE%89%E8%A3%85.html#修改docker默认存储位置" class="toc-sidebar-link">修改Docker默认存储位置</a><ul class="toc-sidebar-sub-headers"><li class="toc-sidebar-sub-header"><a href="/md/devops/docker/Docker-%E5%AE%89%E8%A3%85.html#默认路径" class="toc-sidebar-link">默认路径</a></li><li class="toc-sidebar-sub-header"><a href="/md/devops/docker/Docker-%E5%AE%89%E8%A3%85.html#修改配置-2" class="toc-sidebar-link">修改配置</a></li><li class="toc-sidebar-sub-header"><a href="/md/devops/docker/Docker-%E5%AE%89%E8%A3%85.html#重启服务" class="toc-sidebar-link">重启服务</a></li><li class="toc-sidebar-sub-header"><a href="/md/devops/docker/Docker-%E5%AE%89%E8%A3%85.html#验证" class="toc-sidebar-link">验证</a></li></ul></li></ul></div></div></div></div></div> <div class="option-box"><img src="/images/system/wechat.png" class="nozoom"> <span class="show-txt">手机看</span> <div class="toc-container"><div class="pos-box"><div class="icon-arrow"></div> <div class="scroll-box" style="text-align:center"><span style="font-size:0.9rem">微信扫一扫</span> <img height="180px" src="https://api.qrserver.com/v1/create-qr-code/?data=http://zhufj.com/md/devops/docker/Docker-%E5%AE%89%E8%A3%85.html" style="margin:10px;">
              可以<b>手机看</b>或分享至<b>朋友圈</b></div></div></div></div> <div class="option-box"><a title="点击切换全屏" style="text-align:center;padding-left:2px;"><img src="/images/system/full.png" width="30px" class="nozoom"> <span style="color:gray;font-size:11px;font-weight:400;">全屏看</span></a></div> <div class="option-box"><img src="/images/system/toggle.png" width="30px" class="nozoom"> <span class="show-txt">左栏</span></div> <div class="option-box"><img src="/images/system/download.png" width="25px" class="nozoom"> <span class="show-txt">下资料</span> <div class="toc-container"><div class="pos-box"><div class="icon-arrow"></div> <div class="scroll-box" style="text-align:center"><span style="font-size:0.8rem;font-weight:bold;">扫描公众号，回复<span style="color:red;">“1024”</span>下载<span style="color:red;">100GB+</span>大学到毕业分阶段学习技术资料、PDF书籍、实战项目、简历模板等「无任何套路」</span> <img src="/images/personal/qrcode.jpg" height="180px" style="margin:10px;"> <b>公众号:</b> BJCoder
            </div></div></div></div> <div title="Docker 简介" class="option-box" style="padding-left:2px;text-align:center;"><a href="/md/devops/docker/Docker-简介.html"><img src="/images/system/pre2.png" width="30px" class="nozoom"> <span class="show-txt">上一篇</span></a></div> <div title="Docker 常用命令" class="option-box" style="padding-left:2px;text-align:center;"><a href="/md/devops/docker/Docker-常用命令.html"><img src="/images/system/next2.png" width="30px" class="nozoom"> <span class="show-txt">下一篇</span></a></div></div>  <div class="page-side-sitemap"><div class="option-box"><img src="/images/system/sitemap.png" class="nozoom img"> <span class="show-txt">站点图</span> <div class="sitemap-container"><h4>站点导航图</h4> <table class="sitemap-table"><tr><td nowrap="nowrap"><div class="sitemap-col-group">常用搜索</div></td> <td><div class="sitemap-col-item"><a href="http://www.baidu.com/" target="_blank" title="百度">  
          百度
          <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="sitemap-col-item"><a href="http://www.google.com/" target="_blank" title="Google">  
          Google
          <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="sitemap-col-item"><a href="http://www.bing.com/" target="_blank" title="Bing">  
          Bing
          <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="sitemap-col-item"><a href="https://github.com" target="_blank" title="Github">  
          Github
          <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="sitemap-col-item"><a href="https://www.programcreek.com/java-api-examples/index.php" target="_blank" title="搜代码">  
          搜代码
          <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div></td> <!----></tr><tr><td nowrap="nowrap"><div class="sitemap-col-group">技术社区</div></td> <td><div class="sitemap-col-item"><a href="http://www.csdn.net/" target="_blank" title="CDSN">  
          CDSN
          <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="sitemap-col-item"><a href="http://www.cnblogs.com/" target="_blank" title="博客园">  
          博客园
          <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="sitemap-col-item"><a href="https://www.oschina.net" target="_blank" title="OSChina">  
          OSChina
          <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="sitemap-col-item"><a href="https://segmentfault.com/" target="_blank" title="思否">  
          思否
          <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="sitemap-col-item"><a href="https://juejin.im" target="_blank" title="掘金">  
          掘金
          <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="sitemap-col-item"><a href="https://www.linuxidc.com/" target="_blank" title="Linux公社">  
          Linux公社
          <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="sitemap-col-item"><a href="https://www.ibm.com/developerworks/cn/" target="_blank" title="IBM 开发者">  
          IBM 开发者
          <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="sitemap-col-item"><a href="https://stackoverflow.com" target="_blank" title="StackOverflow">  
          StackOverflow
          <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div></td> <!----></tr></table></div></div></div> <!----> </aside></div><div class="global-ui"><div class="pay-read-more-wrap" style="display:none;position:absolute;bottom:0px;z-index:9999;width:100%;margin-top:-100px;font-family:PingFangSC-Regular, sans-serif;"><div id="pay-read-more-mask" style="position: relative; height: 200px; background: -webkit-gradient(linear, 0 0%, 0 100%, from(rgba(255, 255, 255, 0)), to(rgb(255, 255, 255)));"></div> <a id="pay-read-more-btn" target="_blank" style="position: absolute; left: 50%; top: 70%; bottom: 30px; transform: translate(-50%, -50%); width: 160px; height: 36px; line-height: 36px; font-size: 15px; text-align: center; border: 1px solid rgb(222, 104, 109); color: rgb(222, 104, 109); background: rgb(255, 255, 255); cursor: pointer; border-radius: 6px;">付费阅读</a></div></div></div>
    <script src="/assets/js/cg-styles.js?v=1722145213052" defer></script><script src="/assets/js/cg-4.js?v=1722145213052" defer></script><script src="/assets/js/cg-44.js?v=1722145213052" defer></script><script src="/assets/js/cg-2.js?v=1722145213052" defer></script><script src="/assets/js/cg-25.js?v=1722145213052" defer></script><script src="/assets/js/cg-app.js?v=1722145213052" defer></script>
  </body>
</html>
